package a.f.d.a;

import a.c.ab;
import a.c.e;
import a.c.k;
import a.c.z;
import a.f.o;
import a.f.zb;

final class jb
{
  public void a(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.d[] arrayOfd = paramo.u();
    int i = 0;
    do
    {
      if (i >= arrayOfd.length) {
        break;
      }
      a.c.d locald = arrayOfd[i];
      ec localec1 = parambc.a(locald.e());
      ec localec2 = parambc.a(locald.f());
      if (!bool2)
      {
        if (localec2.h() - localec1.h() > 1) {
          a(paramo, locald, paramac, parambc, paramrb, false);
        }
        i++;
      }
    } while (!bool1);
  }
  
  public void a(o paramo, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.w localw = paramo.v();
    label149:
    label151:
    label305:
    label329:
    label337:
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        Object localObject = localw.d();
        ec localec = parambc.a((e)localObject);
        if (bool1) {
          break label377;
        }
        if (localec.d() == 1)
        {
          do
          {
            if (bool2) {
              break label337;
            }
            if (paramo.j(localec.g())) {
              break label329;
            }
            e locale = ((e)localObject).i().e();
            do
            {
              if (parambc.a(locale).d() != 1) {
                break;
              }
              localObject = locale;
              if (bool2) {
                break label151;
              }
              locale = ((e)localObject).i().e();
              if (bool1) {
                break label149;
              }
            } while (!bool1);
          } while (bool2);
          paramo.g(localec.g());
          a.c.d locald = ((e)localObject).i();
          z localz = new z();
          a.d.w localw1;
          a.d.w localw2;
          if (parambc.a(locald.f()).d() == 1)
          {
            localw1 = paramo.r(locald);
            localz.add(localw1);
            localz.a(paramo.m(locald));
            localw2 = paramo.s(locald);
          }
          do
          {
            if (bool1) {
              break label305;
            }
            if (!localw2.equals(localw1)) {
              localz.add(localw2);
            }
            locald = locald.f().h();
            if (!bool1) {
              break;
            }
            localw1 = paramo.r(locald);
            localz.add(localw1);
            localz.a(paramo.m(locald));
            localw2 = paramo.s(locald);
          } while (bool2);
          if (!localw2.equals(localw1)) {
            localz.add(localw2);
          }
          paramo.a(localec.g(), localz);
        }
        localw.f();
      } while (!bool1);
    } while (bool2);
    label377:
    do
    {
      localw = paramo.v();
      while (!bool1)
      {
        if (!localw.e()) {
          break;
        }
        if (parambc.a(localw.d()).d() == 1) {
          paramo.a(localw.d());
        }
        localw.f();
      }
    } while (bool2);
  }
  
  public void a(o paramo, ac paramac, e parame, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.d locald1 = parame.i();
    a.c.d locald2 = parame.h();
    zb localzb1 = paramo.e(locald1);
    zb localzb2 = paramo.e(locald2);
    a.d.w localw1 = paramo.s(locald1);
    localzb1.a(localw1.a, localw1.b);
    a.d.w localw2 = paramo.r(locald2);
    if ((bool2) || (localw2.a == localw1.a))
    {
      if (bool2) {
        break label127;
      }
      if (localw2.b == localw1.b) {}
    }
    else
    {
      localzb1.a(localw2.a, localw2.b);
    }
    label127:
    int i = 0;
    do
    {
      if (i >= localzb2.a()) {
        break;
      }
      a.d.w localw3 = localzb2.a(i);
      localzb1.a(localw3.a, localw3.b);
      i++;
      if ((!bool2) && (bool1)) {
        return;
      }
    } while (!bool1);
    localzb1.b(localzb2.d());
    paramo.a(locald1, locald1.e(), locald2.f());
    paramo.a(locald2);
    if (!bool2) {
      paramo.a(parame);
    }
  }
  
  public ab a(o paramo, a.c.d paramd, ac paramac, bc parambc, rb paramrb, boolean paramBoolean)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    ec localec1 = parambc.a(paramd.e());
    ec localec2 = parambc.a(paramd.f());
    y localy = parambc.a(paramd);
    if (localec1.h() + 1 >= localec2.h()) {
      return null;
    }
    ab localab = null;
    if (paramBoolean) {
      localab = new ab();
    }
    k localk = paramo.c("com.yworks.yfiles.bpmn.layout.BpmnLayouter.ASSIGN_DUMMIES_TO_SOURCE_LANE");
    Object localObject = paramd.e();
    int i = localec1.h() + 1;
    if (i < localec2.h()) {
      if ((bool2) || (localk != null))
      {
        if (localk.getBool(paramd))
        {
          locale = paramrb.a(paramac.a(i), paramd, localy.k() ? localec2.n() : localec1.n());
          if (!bool1) {
            break label265;
          }
        }
        if (bool2) {
          break label263;
        }
        locale = paramrb.a(paramac.a(i), paramd, localy.k() ? localec1.n() : localec2.n());
        if (!bool1) {
          break label265;
        }
      }
    }
    label263:
    label265:
    while (bool2)
    {
      e locale = paramrb.a(paramac.a(i), paramd);
      a.c.d locald2 = paramrb.a((e)localObject, locale, paramd, localObject == paramd.e(), false);
      if (!bool2)
      {
        if (localab != null) {
          localab.b(locald2);
        }
        localObject = locale;
        i++;
      }
      if (!bool1) {
        break;
      }
    }
    a.c.d locald1 = paramrb.a((e)localObject, paramd.f(), paramd, false, true);
    if ((bool2) || (localab != null)) {
      localab.b(locald1);
    }
    if ((bool2) || (paramo.j(paramd))) {
      paramo.f(paramd);
    }
    return localab;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.d.a.jb
 * JD-Core Version:    0.7.0.1
 */